
/**
 * Copyright © 2009 Qasky. All rights reserved.
 *
 * UKey授权、认证管理请求接口
 *
 * @author chenglong
 * @version 0.0.0 2022/08/24
 *
 * History:
 * (author, date, desc)
 * (chenglong, 20220824, 创建文件)
 */

import request from '../libs/request';

/**
 * 制作UKey认证预置共享信息
 * @param data
 * @returns {*}
 */
export function makeAuthUKeyToUser (params) {
  return request({
    url: 'api/authmanager/makeAuthUKeyToUser',
    method: 'post',
    data: params
  });
}

/**
 * 获取UKey授权信息
 * @param data
 * @returns {*}
 */
export function getUserAuthUKey (params) {
  return request({
    url: 'api/authmanager/getUserAuthUKey',
    method: 'post',
    data: params
  });
}

/**
 * 获取UKey授权用户信息
 * @param data
 * @returns {*}
 */
export function getSysUserByUKey (params) {
  return request({
    url: 'api/authmanager/getSysUserByUKey',
    method: 'post',
    data: params
  });
}

/**
 * 更新UKey认证预置共享信息
 * @param data
 * @returns {*}
 */
export function updUserAuthUKey (params) {
  return request({
    url: 'api/authmanager/updUserAuthUKey',
    method: 'post',
    data: params
  });
}

/**
 * 撤销UKey授权信息
 * @param data
 * @returns {*}
 */
export function cancelUserAuthUKey (params) {
  return request({
    url: 'api/authmanager/cancelUserAuthUKey',
    method: 'post',
    data: params
  });
}

/**
 * 实体鉴别请求
 * @param data
 * @returns {*}
 */
export function actUkeyAuthRequest (params) {
  return request({
    url: 'api/auth/actUkeyAuthRequest',
    method: 'post',
    data: params
  });
}

/**
 * 验证实体鉴别请求
 * @param data
 * @returns {*}
 */
export function verifyUKeyAuthRequst (params) {
  return request({
    url: 'api/auth/verifyUKeyAuthRequst',
    method: 'post',
    data: params
  });
}

/**
 * 验证实体鉴别认证的共享密钥
 * @param data
 * @returns {*}
 */
export function verifyDevAuthSymKeys (params) {
  return request({
    url: 'api/authmanager/verifyDevAuthSymKeys',
    method: 'post',
    data: params
  });
}

/**
 * 加载系统默认管理员
 * @param data
 * @returns {*}
 */
export function loadProtectiveSysUser () {
  return request({
    url: 'api/authmanager/loadProtectiveSysUser',
    method: 'get'
  });
}
